Request
curl --location 'https://openapi.gs-robot.com/openapi/v3/schedules/plans/simple/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
"mapResourceList": [
{
"mapId": "140bbb83-fe48-4282-be25-c48252b9c660",
"mapResourceId": "327594d9-df72-4950-94b2-64e6d02abdfb",
"mapResourceType": "region"
}
],
"planExecuteType": 1,
"planRepeatType": 2,
"planRepeatWeekly": [
1,
3,
5
],
"planStartDate": "2026-08-29",
"planStartTime": "10:30",
"planStopTime": "11:30",
"robotSn": "TEST00-0000-000-B088",
"siteMode": 0,
"taskName": "Weekday cleaning schedule",
"workMode": {
"mode": "wash"
}
}'
Version requirement: This API is supported only on AIO software version 1.6 and later.
Call flow
- Call
/openapi/v3/maps/schedule-resources/listand obtain the robot's actual map resources and work modes frommapsandworkModes. - Call this API to create the plan. On success,
datacontains the operation result returned by the schedule service; this API does not returnplanUuiddirectly. - Call
/openapi/v3/schedules/plans/pre-tasks/day/listfor the scheduled date and obtain theplanUuidneeded for subsequent update, delete, or detail queries fromdata.preTasks[].planUuid.
Notes
- Mutation APIs use integer
planExecuteType:1for a timed task and2for a quantitative task. Query APIs returnTIMED_SCHEDULING_TASKandQUANTITATIVE_SCH_TASK, respectively. planRepeatType=0means one-time;planRepeatType=2means weekly, in which caseplanRepeatWeeklyis required and non-empty. Values0through6represent Sunday through Saturday.- Times use
HH:mmin 24-hour format. The start date cannot be in the past; for the current date, the start time must also be later than the current time. A timed task requires a non-emptyplanStopTime. A quantitative task may omit it, and the service treats it as one minute after the start time. An explicit end time must be later than the start time; crossing midnight is not supported. - Do not send
siteIdwhensiteMode=0;siteIdis required whensiteMode=1. - Use
maps[].robotMapUuidasmapId. EachmapResourceListitem requires onlymapId,mapResourceId, andmapResourceType; do not send a separaterobotMapUuid. - All
workModefields must be based on the actualworkModesresponse. Ifmodealone does not identify exactly one configuration, also sendsubType,type, orstrength. Omittingstrengthuses the default strength.
Response
{
"code": 0,
"data": {},
"msg": "success"
}